home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 112 / 112.d81 / asm.drive check < prev    next >
Text File  |  2022-08-26  |  1KB  |  61 lines

  1.   tksa=$ff96
  2. acptr=$ffa5
  3. untlk=$ffab
  4. talk=$ffb4
  5. clrchn=$ffcc
  6. chrout=$ffd2
  7. *=$010b;$010b-$013e (267-318)
  8. ;is for cassette use
  9. ;and cannot be over-
  10. ;written by the stack.
  11. ;Routine stays in mem-
  12. ;ory even after compu-
  13. ;ter is reset.
  14.  
  15. jsrclrchn;clear i/o channels
  16.  
  17. lda$ba;decimal 186 is lo
  18. ;cation of device
  19. ;number
  20. cmp #8
  21. bcsokdevice;branch if device
  22. ;number is greater
  23. ;than or equal to 8
  24. lda #8;these lines are 
  25. sta$ba ;equivalent to the
  26. ;BASIC line: dv=
  27. ;peek(186):if dv<8
  28. ;then dv=8
  29. okdevice:jsrtalk;command a de-
  30. ;vice on serial
  31. ;bus to send
  32. ;data
  33. lda#$6f;111 decimal=15
  34. ;(sec. addr.)+
  35. ;96 ($60)
  36. sta $b9;185 decimal
  37. ;location of 
  38. ;secondary addr.
  39.  jsr tksa;send a secon-
  40. ;dary addr. to
  41. ;a device com-
  42. ;manded to talk
  43. lda #$0d;print a car-
  44. ;riage return
  45. output: jsr chrout;display a byte
  46. ;in accumulator
  47. ;on screen
  48. jsr acptr;input byte 
  49. ;from serial 
  50. ;bus
  51. cmp #$0d;is it a car-
  52. ;riage return?
  53. bne output;no, get ano-
  54. ;ther byte
  55. jsr chrout
  56. jmpuntlk;devices set to
  57. ;talk will stop
  58. ;sending data 
  59. rts
  60. .end
  61.